package com.jingdianjichi.subject.domain.convent;

import com.jingdianjichi.subject.domain.entity.SubjectCategoryBO;
import com.jingdianjichi.subject.infra.basic.entity.SubjectCategory;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 题目分类转换器 BO->DO
 */
@Mapper
public interface SubjectCategoryConverter {

    SubjectCategoryConverter INSTANCE = Mappers.getMapper(SubjectCategoryConverter.class);

    /**
     * 将BO转换为DO
     *
     * @param subjectCategoryBO 题目分类BO
     * @return 题目分类DO
     */
    SubjectCategory converBoToCategory(SubjectCategoryBO subjectCategoryBO);

    /**
     * 将DO转换为BO
     *
     * @param categoryList 题目分类DO
     * @return 题目分类BO
     */
    List<SubjectCategoryBO> converBoToCategory(List<SubjectCategory> categoryList);
}
